{% comment %}
<!--
  Copyright (C) 2010 ZHENG Zhong <http://www.zhengzhong.net/>
  Created on 2010-02-19.
  $Id$
-->
{% endcomment %}

{% load friday_extra %}

<div class="ajax">

  {% for resto in restos %}

    <div class="post">

      <div class="post-head">
        <a href="{% url friday.view_resto resto_id=resto.id %}">{{ resto|escape }}</a>
      </div>

      <div class="post-body">
        {% if resto.description %}
          {{ resto.description|summary:200|escape }}
        {% else %}
          <div class="na">This restaurant has no description.</div>
        {% endif %}
      </div>

      <div class="post-foot">

        <div>
          <img class="icon" src="{{ static_ }}/images/address.png" alt="Address"/>
          {{ resto.address|escape }},
          {{ resto.city|escape }}
          {{ resto.post_code|default:""|escape }}
          {% if resto.tels %}
            &nbsp;
            <img class="icon" src="{{ static_ }}/images/tel.png" alt="Tel"/>
            {{ resto.tels|join:" / "|escape }}
          {% endif %}
          &nbsp;
          <img class="icon" src="{{ static_ }}/images/category.png" alt="Category"/>
          <a href="{% url friday.view_restos_by_category category=resto.category %}">
            {{ resto.get_category_display|escape }}
          </a>
        </div>

        {% if resto.tags %}
          <div>
            {% for tag in resto.tags %}
              <img class="icon" src="{{ static_ }}/images/tag.png" alt="Tag"/>
              <a href="{% url friday.view_restos_by_tag %}?tag_name={{ tag|urlencode }}">{{ tag|escape }}</a>
              &nbsp;
            {% endfor %}
          </div>
        {% endif %}

      </div>

    </div>

  {% empty %}

    <p class="na">No restaurants found.</p>

  {% endfor %}

</div>



